.class Lcom/example/m6shop/ShopPsActivity$6;
.super Ljava/lang/Thread;
.source "ShopPsActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6shop/ShopPsActivity;->getSource()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6shop/ShopPsActivity;


# direct methods
.method constructor <init>(Lcom/example/m6shop/ShopPsActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6shop/ShopPsActivity$6;->this$0:Lcom/example/m6shop/ShopPsActivity;

    .line 274
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 14

    .prologue
    .line 276
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 279
    iget-object v11, p0, Lcom/example/m6shop/ShopPsActivity$6;->this$0:Lcom/example/m6shop/ShopPsActivity;

    .line 280
    const-string v12, "userInfo"

    const/4 v13, 0x0

    .line 279
    invoke-virtual {v11, v12, v13}, Lcom/example/m6shop/ShopPsActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v7

    .line 281
    .local v7, "preferences":Landroid/content/SharedPreferences;
    const-string v11, "uid"

    const-string v12, ""

    invoke-interface {v7, v11, v12}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 282
    .local v0, "account":Ljava/lang/String;
    const-string v11, "pass"

    const-string v12, ""

    invoke-interface {v7, v11, v12}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    .line 284
    .local v6, "password":Ljava/lang/String;
    new-instance v11, Ljava/lang/StringBuilder;

    iget-object v12, p0, Lcom/example/m6shop/ShopPsActivity$6;->this$0:Lcom/example/m6shop/ShopPsActivity;

    iget-object v12, v12, Lcom/example/m6shop/ShopPsActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v12}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v12

    invoke-static {v12}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v12

    invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v12, "/index.php?ctrl=app&action=shop_pstimelist&uid="

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "&pwd="

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "&datatype=json"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    .line 285
    .local v10, "url":Ljava/lang/String;
    sget-object v11, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v12, Ljava/lang/StringBuilder;

    const-string v13, "--->"

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v12, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v11, v12}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 286
    invoke-static {v10}, Lmyclass/HttpConn;->getStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    .line 287
    .local v9, "str":Ljava/lang/String;
    sget-object v11, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v12, Ljava/lang/StringBuilder;

    const-string v13, "--->\u6570\u636e\u5185\u5bb9"

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v12, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v11, v12}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 289
    :try_start_0
    new-instance v4, Lorg/json/JSONObject;

    invoke-direct {v4, v9}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 290
    .local v4, "json":Lorg/json/JSONObject;
    new-instance v5, Landroid/os/Message;

    invoke-direct {v5}, Landroid/os/Message;-><init>()V

    .line 291
    .local v5, "msg":Landroid/os/Message;
    const-string v11, "error"

    invoke-virtual {v4, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    const-string v12, "true"

    invoke-virtual {v11, v12}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    if-eqz v11, :cond_0

    .line 292
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 293
    const-string v11, "msg"

    invoke-virtual {v4, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    iput-object v11, v5, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 294
    const/4 v11, 0x1

    iput v11, v5, Landroid/os/Message;->arg1:I

    .line 295
    sget-object v11, Lcom/example/m6shop/ShopPsActivity;->h:Landroid/os/Handler;

    invoke-virtual {v11, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 319
    .end local v4    # "json":Lorg/json/JSONObject;
    :goto_0
    return-void

    .line 299
    .restart local v4    # "json":Lorg/json/JSONObject;
    :cond_0
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 300
    const-string v11, "msg"

    invoke-virtual {v4, v11}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v3

    .line 301
    .local v3, "ja":Lorg/json/JSONArray;
    const/4 v2, 0x0

    .local v2, "i":I
    :goto_1
    invoke-virtual {v3}, Lorg/json/JSONArray;->length()I

    move-result v11

    if-lt v2, v11, :cond_1

    .line 309
    const/4 v11, 0x3

    iput v11, v5, Landroid/os/Message;->arg1:I

    .line 310
    sget-object v11, Lcom/example/m6shop/ShopPsActivity;->h:Landroid/os/Handler;

    invoke-virtual {v11, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 311
    .end local v2    # "i":I
    .end local v3    # "ja":Lorg/json/JSONArray;
    .end local v4    # "json":Lorg/json/JSONObject;
    .end local v5    # "msg":Landroid/os/Message;
    :catch_0
    move-exception v1

    .line 313
    .local v1, "e":Lorg/json/JSONException;
    invoke-virtual {v1}, Lorg/json/JSONException;->printStackTrace()V

    .line 314
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 315
    new-instance v5, Landroid/os/Message;

    invoke-direct {v5}, Landroid/os/Message;-><init>()V

    .line 316
    .restart local v5    # "msg":Landroid/os/Message;
    const/4 v11, 0x4

    iput v11, v5, Landroid/os/Message;->arg1:I

    .line 317
    sget-object v11, Lcom/example/m6shop/ShopPsActivity;->h:Landroid/os/Handler;

    invoke-virtual {v11, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 302
    .end local v1    # "e":Lorg/json/JSONException;
    .restart local v2    # "i":I
    .restart local v3    # "ja":Lorg/json/JSONArray;
    .restart local v4    # "json":Lorg/json/JSONObject;
    :cond_1
    :try_start_1
    new-instance v8, Lbean/Pstimebean;

    invoke-direct {v8}, Lbean/Pstimebean;-><init>()V

    .line 303
    .local v8, "ps":Lbean/Pstimebean;
    invoke-virtual {v8, v2}, Lbean/Pstimebean;->setId(I)V

    .line 304
    invoke-virtual {v3, v2}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "choice"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v8, v11}, Lbean/Pstimebean;->setChoice(Ljava/lang/String;)V

    .line 305
    invoke-virtual {v3, v2}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "stime"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v8, v11}, Lbean/Pstimebean;->setStime(Ljava/lang/String;)V

    .line 306
    invoke-virtual {v3, v2}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "etime"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v8, v11}, Lbean/Pstimebean;->setEtime(Ljava/lang/String;)V

    .line 307
    iget-object v11, p0, Lcom/example/m6shop/ShopPsActivity$6;->this$0:Lcom/example/m6shop/ShopPsActivity;

    # getter for: Lcom/example/m6shop/ShopPsActivity;->list:Ljava/util/List;
    invoke-static {v11}, Lcom/example/m6shop/ShopPsActivity;->access$0(Lcom/example/m6shop/ShopPsActivity;)Ljava/util/List;

    move-result-object v11

    invoke-interface {v11, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    .line 301
    add-int/lit8 v2, v2, 0x1

    goto :goto_1
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 322
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 323
    monitor-exit p0

    return-void

    .line 322
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
